﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace SteamFluentAPI.Infrastructure.Base
{
    /// <summary>
    /// Marks a property as a steam interface.
    /// </summary>
    [AttributeUsage(AttributeTargets.Property)]
    public class SteamInterfaceAttribute : Attribute
    {
        public SteamGameType SteamGameType { get; set; }
        public bool RequiresGameType { get; set; }
        public string InterfaceName { get; set; }

        public SteamInterfaceAttribute() : this(false) { }

        public SteamInterfaceAttribute(bool requiresGameType) : this(SteamGameType.None, requiresGameType) { }

        public SteamInterfaceAttribute(SteamGameType steamGameType)
        {
            SteamGameType = steamGameType;
            RequiresGameType = false;
            InterfaceName = "";
        }

        public SteamInterfaceAttribute(string interfaceName, SteamGameType steamGameType) : this(steamGameType, false)
        {
            InterfaceName = interfaceName;
        }

        public SteamInterfaceAttribute(SteamGameType steamGameType, bool requiresGameType)
        {
            SteamGameType = steamGameType;
            RequiresGameType = requiresGameType;
            InterfaceName = "";
        }
    }

    /// <summary>
    /// Marks a property as a steam method.
    /// </summary>
    [AttributeUsage(AttributeTargets.Property)]
    public class SteamMethodAttribute : Attribute
    {
        public string VersionCode { get; set; }
        public string MethodName { get; set; }

        public SteamMethodAttribute() : this("") { }
        public SteamMethodAttribute(string versionCode) : this("", versionCode) { }
        public SteamMethodAttribute(string methodName, string versionCode)
        {
            MethodName = methodName;
            VersionCode = versionCode;
        }
    }

    [AttributeUsage(AttributeTargets.Property)]
    public class SteamRootEntityAttribute : Attribute
    {

    }

    /// <summary>
    /// Marks a method as a required steam parameter.
    /// </summary>
    [AttributeUsage(AttributeTargets.Method)]
    public class RequiredParameterAttribute : Attribute
    {
        public bool IsRequired = true;
        public string ParameterName { get; set; }

        public RequiredParameterAttribute(string parameterName)
        {
            ParameterName = parameterName;
        }
    }

    /// <summary>
    /// Marks a property as not implemented.
    /// </summary>
    [AttributeUsage(AttributeTargets.Property)]
    public class NotImplementedAttribute : Attribute
    {
        public bool IsImplemented = false;
    }
}
